<?php

namespace App\Repository\Anchor;

use App\Models\Anchor\AnchorModel as model;
use App\Repository\BaseRepository;

//主播
class AnchorRepository extends BaseRepository
{
    public $model;
    public $log;

    public function __construct()
    {
        $this->model = new model();
//    $this->log = new Logger('anchor');
//    $this->log->pushHandler(
//      (new RotatingFileHandler(storage_path('/logs/anchor.log'), 14, Logger::DEBUG, true, 0777))->setFormatter(new LineFormatter(null, null, true, true))
//    );
        parent::__construct();
    }

    //列表
    public function index($where)
    {
        $cron = $where;
        $cron['order'] = ['orderby' => 'id', 'orderdir' => 'desc'];
        $data = $this->search($this->model, $cron);
        return $data;
    }
}
